<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>ajax发送get请求</title>
</head>
<script src="../jquery-3.5.1/jquery-3.5.1.min.js"></script>
<script>
    $.get("data.json",{"new":"test"},function (data) {
        console.log('请求成功！');
        console.log(data);
        console.log(data.name);
        console.log(data.age)
    },"JSON").fail(function () {
        console.log('请求失败！')
    });
</script>
<body>

</body>
</html>